Skip to content

feat(npm_nodejs): hacked in npm module support #57

Open
DerekZiemba wants to merge 6 commits intodwachss:masterfrom
DerekZiemba:master
Open

feat(npm_nodejs): hacked in npm module support #57
DerekZiemba wants to merge 6 commits intodwachss:masterfrom
DerekZiemba:master

Conversation

@DerekZiemba
Copy link

@DerekZiemba DerekZiemba commented May 9, 2024

I wanted to be able to npm install git@github.com:DerekZiemba/bililiteRange.git#v5.0.0

So I hacked in module support, added a package.json, and changed the way it's built. It's quick & dirty, but could serve as a starting point if you were inclined to add npm support.

Other notable Changes:

  • Incremented version to 5.0.0
  • dist/bililiteRange.js now also includes bililiteRange.lines.js & jquery.sendkeys.js
  • dist/editor.js build step was removed (commented out) because it was sourcing files from other repos via webrequest & I don't intend to make those compatible.
  • My auto-linter did a number on it. Much of the ES3 code got converted to ES6
  • Added some basic typing via @jsdoc so intellisense works
  • Instead of simple concatenation & not wanting to introduce a dependency, I created module-support.js to mock nodejs's module.exports & require() mechanisms so types/Intellisense would work across files.
    • It's still fully web compatible as long as there isn't a module variable globally declared somewhere, in which case it would incorrectly export itself to an exports property on that object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments